﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using System.Data;
using DBA.Common;
using DBA.Data;
using DBA.Data.ADO;


namespace DBA.Bll
{
    public class BllStudentInfo
    {
        DataAccessLibrary dal = CommonQuery.DataAccessLibrary;
        public DataTable GetStudentInfoExcel()
        {
            //"姓名,性别,出生日期,导师,入学时间,毕业时间,毕业专业,学历,论文题目"
            StringBuffer sql = "SELECT Name as [姓名],case when Sex = 1 then '男' else '女' end as [性别],";
            sql += "Convert(char(10),Birthday,120) as [出生日期],TeacherName as [导师],Convert(char(10),InSchoolTime,120) as [入学时间],";
            sql += "Convert(char(10),GranduateTime,120) as [毕业时间],OutSpecialty as [毕业专业],Degree as [学历],";
            sql += "PaperSubject as [论文题目] FROM vw_StudentInfo";
            return dal.ModifyData.Select(sql);
            
        }
    }
}
